<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>ACSystem</title>
<link href="<?echo base_url();?>css/main_view.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="carrier">
	<?
	include("application/views/blocks/login_menu.php");
	include("application/views/blocks/header.php");
	include("application/views/blocks/main_menu.php");
	include("application/views/blocks/admin_menu.php");
	?>
	<br/>
    <div id="content">
		<div id="users">
		<?
		if(isset($users))
		{
			echo "<label><h2>".$title."</h2></label>";
			foreach($users as &$user)
			{
				echo '<div id="user_data">';
				echo '<p>Login: '.$user['Login'].'</p>';
				echo '<p>ID: '.$user['UserId'].'</p>';
				echo '<p>Name: '.$user['Name'].'</p>';
				echo '<p>Surname: '.$user['Surname'].'</p>';
				echo '<p>E-mail: '.$user['Email'].'</p>';
				echo '<p>Tel. number: '.$user['TelNumber'].'</p>';
				echo '<p>Creation Date: '.$user['CreationDate'].'</p>';
				if($user['IsActivated'] == 0 && $user['DeleteRequest'] == 0) {
					echo '<div id="user_btns">';
					echo anchor('admin/activateUser?id='.$user['UserId'],'Activate')." ";
					echo anchor('admin/deleteUser?id='.$user['UserId'],'Delete');
					echo "</div>";
				}
				else if ($user['IsActivated'] == 1 && $user['DeleteRequest'] == 1) {
					echo '<div id="user_btns">';
					echo anchor('admin/deleteUser?id='.$user['UserId'],'Delete');
					echo "</div>";
				}
				echo '</div></br>';
			}
		}
		?>
		</div>
    </div>
    <?
	include("blocks/footer.php");
	?>
  </div>
</body>
</html>